package com.codepilot.server.controller;

import com.codepilot.server.model.vo.CommonResult;
import com.codepilot.server.model.vo.RecommendListVO;
import com.codepilot.server.model.vo.RecommendVO;
import com.codepilot.server.service.RecommendService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("api/user/recommend")
@Api(tags = "推荐信息获取接口")
public class RecommendController {

    @Autowired
    private RecommendService recommendService;

    @GetMapping("")
    @ApiOperation("获取推荐列表")
    public CommonResult<RecommendListVO> getRecommends(@RequestParam("type") String type) {
        return recommendService.getRecommends(type);
    }

}
